/*
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-09-26 15:16:08
 * @LastEditTime: 2021-02-26 09:53:20
 * @LastEditors: Please set LastEditors
 */
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 引入$bus
import bus from "./utils/bus.js"
Vue.prototype.$bus = bus;


// 骨架屏幕安装插件
import VueSkeletonLoading from 'vue-skeleton-loading';
Vue.use(VueSkeletonLoading);

// 重置样式
import './assets/css/reset.css'
// 配置主题样式
import './assets/css/theme.less'

// rem布局
import 'amfe-flexible';

// 引入element-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 表单生成器
import formCreate from '@form-create/element-ui'
Vue.use(formCreate)

import OrganizationChart from 'vue-organization-chart'
import 'vue-organization-chart/dist/orgchart.css'
Vue.use(OrganizationChart);
Vue.component("OrganizationChart", OrganizationChart);

// 引入UI组件
import vant from 'vant';
import 'vant/lib/index.css';

Vue.use(vant);
// vant消息通知
import { Notify } from 'vant';
Vue.use(Notify);

// 引入mint组件库
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI);

// 引入瀑布流
import waterfall from 'vue-waterfall2';
Vue.use(waterfall);

// 拖拽组件 npm install --save vuedraggable
import vuedraggable from 'vuedraggable';
Vue.component('vuedraggable',vuedraggable);

// 环形进度条插件 npm install --save vue-radial-progress
import RadialProgressBar from 'vue-radial-progress'
Vue.component('RadialProgressBar',RadialProgressBar)

// 图像像加载失败后显示默认图像
Vue.directive("nopic",{
  bind(el){
    el.onerror = function (e){
      e.target.src = require("./assets/images/404.gif");
    }
  }
})

// 上拉加载下拉刷新
import VueScroller from 'vue-scroller'
Vue.use(VueScroller)


// 图表插件
import echarts from "echarts";
Vue.prototype.$echarts = echarts;
import VueECharts from 'vue-echarts';
Vue.component('v-chart', VueECharts)

//渐进式图像加载 
import VueProgressiveImage from 'vue-progressive-image'
Vue.use(VueProgressiveImage, {
  placeholder: require("./assets/images/error.png")
})

// 裁剪图像
import VueCropper from 'vue-cropper' 
Vue.use(VueCropper)


// 水波纹指令
import waves from '@/directive/waves/index.js' // 水波纹指令
//Vue.directive("waves",waves);
Vue.use(waves);

// 生产环境关闭提示
Vue.config.productionTip = false;

// 全局注册组件
import './global';

// loadash方法
import _ from 'lodash';

Vue.prototype._ = _ ;

// vue-lottie动画
import lottie from 'vue-lottie'
Vue.component('lottie',lottie)

// 聊天插件
import Chat from 'vue-beautiful-chat'
Vue.use(Chat)


// 卡片类似即刻
import VueSwing from 'vue-swing'
Vue.component('vue-swing', VueSwing)

// api
import api from '@/api/index.js';
Vue.prototype.$api = api

// vuesax-ui
import Vuesax from 'vuesax'

import 'vuesax/dist/vuesax.css' //Vuesax styles
Vue.use(Vuesax, {
  // options here
})

// space11


// 全局data
const global = {};

import Print from '@/plugins/print.js'
Vue.use(Print) // 注册

const vue =  new Vue({
  router,
  data(){
    return{
      global
    }
  },
  store,
  render: h => h(App)
 }).$mount('#app')
console.log("vue1", vue);
 export default vue
